package com.course.coursedesign2022.service;

import com.course.coursedesign2022.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FillInformation {
    @Autowired
    private UserMapper userMapper;
    public String fillInfo(Integer id){
        Integer isFilled = userMapper.getUserInfoById(id).getIsInfo();
        if(isFilled==1){
            return "已经填写过个人信息，无法继续加分";
        }
        userMapper.fiilInfo(id);
        return "首次填写个人信息，成长积分+2";
    }
}
